<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMinappTable extends Migration
{
    /**
     * Run the migrations.

       'name'=>$this->toUTF8($value->name),
                'created_by'=>$value->created_by,
                'description'=>$this->toUTF8($value->description),
                'icon'=>$value->icon->image,
                'qrcode'=>$value->qrcode?$value->qrcode->image:'',
                'tag'=>$this->parseTag($value->tag),
                'screenshot'=>$this->parseScreenShot($value->screenshot),
                'tag_id'=>intval($filename)
     *
     * @return void
     */
    public function up()
    {
        Schema::create('minapp', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->comment("小程序名称");
            $table->string('description')->comment('描述');
            $table->string('icon')->comment('icon');
            $table->string('created_by')->comment('作者');
            $table->string('qrcode')->comment('小程序二维码');
            $table->string('tag')->comment('小程序标签'); //app so 
            $table->string('tag_id')->comment('分类id');// 原appso 
            $table->text('screenshot')->comment('小程序截图');//原appso 
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('minapp');
    }
}
